﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SharpMedia
{
    public class VideoList : List<VideoSource>
    {
        protected int selectedIndex = 0;
        public int SelectedIndex
        {
            get { return selectedIndex; }
            set 
            {
                if (Count == 0)
                {
                    selectedIndex = -1;
                    return;
                }

                selectedIndex = value % Count;

            } 
        }
        public VideoSource SelectedItem
        {
            get
            {
                return this[SelectedIndex];
            }
        }
    }


    public class VideoSource
    {
        public string Name { get; set; }
        public string File { get; set; }

        public VideoSource(string name, string file)
        {
            this.Name = name;
            this.File = file;
        }

    }
}
